﻿<UserControl 
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"  
    x:Class="Caliburn.Micro.BikeWizard.Views.BikeTypeFrameSizeView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:Caliburn.Micro.BikeWizard.Controls;assembly=Caliburn.Micro.BikeWizard.Controls"
    mc:Ignorable="d">

    <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Stretch">
        <Grid HorizontalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
           
            <controls:GroupBox
                Grid.Row="0"
                Grid.Column="0"
                FontWeight="Bold"
                Header="Bike type"
                Margin="5"
                HorizontalAlignment="Stretch">

                <ItemsControl x:Name="AvailableBikeTypes" FontWeight="Normal">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <RadioButton
                                Content="{Binding Path=DisplayName}"
                                IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"
                                GroupName="BikeType"
                                Margin="2,3.5"
                                />
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </controls:GroupBox>

            <controls:GroupBox
                Grid.Row="1"
                Grid.Column="0"
                FontWeight="Bold"
                Header="Frame size"
                Margin="5"
                HorizontalAlignment="Stretch">

                <ItemsControl x:Name="AvailableFrameSizes" FontWeight="Normal">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <RadioButton
                                Content="{Binding Path=DisplayName}"
                                IsChecked="{Binding Path=IsSelected, Mode=TwoWay}"
                                GroupName="FrameSize"
                                Margin="2,3.5"
                                />
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </controls:GroupBox>
        </Grid>
    </Grid>
</UserControl>
